package org.example.listener;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(topic = "%DLQ%my-consumer-group",consumerGroup = "my-consumer-dead-group"
        ,maxReconsumeTimes = 2)
public class DeadMsgListener implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {
        System.out.println("处理死信");
    }
}
